#ifndef GDRSTDFFIELD_H_
#define GDRSTDFFIELD_H_

#include "rectype.h"
#include "chararray.h"
#include <vector>
#include "boost/variant.hpp"


using namespace std;

namespace opsrc {
	namespace stdf {
	
//            typedef boost::variant<unsigned int, signed int, long, float, double, string, vector<bool> , vector<int>, CharArray > gdr_variant;
            typedef boost::variant<unsigned int, signed int, long, float, double, string > gdr_variant;

	
            class GdrStdfField {

            public:
                    GdrStdfField();
                    ~GdrStdfField();

                    gdr_data_typ getGdrDataType() const;
                    void setGdrDataType(gdr_data_typ enumval);

                    int getOffset() const;
                    void setOffset(int offsetval);

                    int getByteCount() const;
                    void setByteCount(int bytecount);

                    int getTotalByteCount() const;
                    void setTotalByteCount(int totalbytecount);

                    gdr_variant getData() const;
                    void setData(gdr_variant data);

                    void set(gdr_variant d, int offset, int len, int tlen, gdr_data_typ typ);


            private:
                    gdr_data_typ gdr_typ;
                    int offset;
                    int bytecount;
                    int totalbytecount;
                    gdr_variant data;

            };
	
	}	// namespace stdf
}		// namespace opsrc


#endif /*GDRSTDFFIELD_H_*/
